<HTML><HEAD>
<TITLE>netwib doc_html (version 5.39.0)</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H2><A HREF="../../index.html">main index</A></H2>
<H2><A HREF="../sys.html">section index</A></H2><HR><BR>
<PRE>

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#880000"><B>/***************************************************************
 * A <FONT COLOR="#000088">netwib_dir</FONT> permits to loop through all filenames in a     *
 * directory.                                                  *
 ***************************************************************/</B></FONT>

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
typedef struct <FONT COLOR="#000088">netwib_dir</FONT> <FONT COLOR="#000088">netwib_dir</FONT>;

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#880000">/* Name : netwib_dir_init
   Description :
     Open a directory.
   Input parameter(s) :
     *pdirname : directory name
   Input/output parameter(s) :
   Output parameter(s) :
     **ppdir : <FONT COLOR="#000088">netwib_dir</FONT> initialized
   Normal return values :
     <FONT COLOR="#000044">NETWIB_ERR_OK</FONT> : ok
*/</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_dir_init</B>(<FONT COLOR="#000088">netwib_constbuf</FONT> *pdirname,
                           <FONT COLOR="#000088">netwib_dir</FONT> **ppdir);

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#880000">/* Name : netwib_dir_close
   Description :
     Close a netwib_dir.
   Input parameter(s) :
   Input/output parameter(s) :
     **ppdir : <FONT COLOR="#000088">netwib_dir</FONT> closed
   Output parameter(s) :
   Normal return values :
     <FONT COLOR="#000044">NETWIB_ERR_OK</FONT> : ok
*/</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_dir_close</B>(<FONT COLOR="#000088">netwib_dir</FONT> **ppdir);

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#880000">/* Types to control a <FONT COLOR="#000088">netwib_dir</FONT> */</FONT>
typedef enum {
  <FONT COLOR="#000044">NETWIB_DIR_CTLTYPE_REWIND</FONT> = 1        <FONT COLOR="#880000">/* position at beginning */</FONT>
} <FONT COLOR="#000088">netwib_dir_ctltype</FONT>;
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_dir_ctl_set</B>(<FONT COLOR="#000088">netwib_dir</FONT> *pdir,
                              <FONT COLOR="#000088">netwib_dir_ctltype</FONT> type,
                              <FONT COLOR="#000088">netwib_ptr</FONT> p,
                              <FONT COLOR="#000088">netwib_uint32</FONT> ui);
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_dir_ctl_get</B>(<FONT COLOR="#000088">netwib_dir</FONT> *pdir,
                              <FONT COLOR="#000088">netwib_dir_ctltype</FONT> type,
                              <FONT COLOR="#000088">netwib_ptr</FONT> p,
                              <FONT COLOR="#000088">netwib_uint32</FONT> *pui);

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#880000">/* <FONT COLOR="#000088">netwib_err</FONT> f(<FONT COLOR="#000088">netwib_dir</FONT> *pdir); */</FONT>
<FONT COLOR="#008800">#define <B>netwib_dir_ctl_set_rewind</B>(pdir) <B>netwib_dir_ctl_set</B>(pdir,<FONT COLOR="#000044">NETWIB_DIR_CTLTYPE_REWIND</FONT>,NULL,0)</FONT>

<FONT COLOR="#880000">/*-------------------------------------------------------------*/</FONT>
<FONT COLOR="#880000">/* Name : netwib_dir_next
   Description :
     Obtain the next file of a netwib_dir.
   Input parameter(s) :
   Input/output parameter(s) :
     **ppdir : netwib_dir
     pbuffilename : buffer containing the filename
   Output parameter(s) :
   Normal return values :
     <FONT COLOR="#000044">NETWIB_ERR_OK</FONT> : ok
   Notes :
     If directory files change between two calls,
     the next result might be incorrect, but it will not crash.
*/</FONT>
<FONT COLOR="#000088">netwib_err</FONT> <B>netwib_dir_next</B>(<FONT COLOR="#000088">netwib_dir</FONT> *pdir,
                           <FONT COLOR="#000088">netwib_buf</FONT> *pbuffilename);
</PRE><BR><BR><HR><BR>
<H2><A HREF="../../index.html">main index</A></H2>
<H2><A HREF="../sys.html">section index</A></H2>
</BODY></HTML>
